package de.stefanocke.roo.kontaktliste.domain;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.entity.RooJpaEntity;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
//@RooJpaActiveRecord
@RooJpaEntity
public class Adresse {
	
	private int index;

    @NotNull
    private String strasse;

    @NotNull
    private String stadt;

    @NotNull
    @Pattern(regexp = "[0-9]{5}", message="Postleitzahl muss aus 5 Ziffern bestehen: #{length()}")
    private String plz;
	


	public int getIndex() {
        return this.index;
    }

	public void setIndex(int index) {
        this.index = index;
    }

	public String getStrasse() {
        return this.strasse;
    }

	public void setStrasse(String strasse) {
        this.strasse = strasse;
    }

	public String getStadt() {
        return this.stadt;
    }

	public void setStadt(String stadt) {
        this.stadt = stadt;
    }

	public String getPlz() {
        return this.plz;
    }

	public void setPlz(String plz) {
        this.plz = plz;
    }
}
